﻿<Activity mc:Ignorable="sap sap2010 sads" x:Class="WorkFlows.WithdrawCashWorkFlow"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:local="clr-namespace:WorkFlows"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:ScreensInterfaces;assembly=ScreensInterfaces"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="IsSuccessful" Type="OutArgument(x:Boolean)" />
  </x:Members>
  <sap2010:ExpressionActivityEditor.ExpressionActivityEditor>C#</sap2010:ExpressionActivityEditor.ExpressionActivityEditor>
  <sap2010:WorkflowViewState.IdRef>WorkFlows.WithdrawCashWorkFlow_1</sap2010:WorkflowViewState.IdRef>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Text</x:String>
      <x:String>ScreensInterfaces</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>Microsoft.CSharp</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Runtime.Serialization</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>ServiceLocator</AssemblyReference>
      <AssemblyReference>ScreensInterfaces</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>WorkFlows</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <StateMachine InitialState="{x:Reference __ReferenceID0}" DisplayName="withdraw cash StateMachine" sap2010:WorkflowViewState.IdRef="StateMachine_1">
    <State x:Name="__ReferenceID0" DisplayName="Get user pin" sap2010:WorkflowViewState.IdRef="State_1">
      <State.Entry>
        <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1">
          <Assign sap2010:WorkflowViewState.IdRef="Assign_1">
            <Assign.To>
              <OutArgument x:TypeArguments="x:Boolean">
                <mca:CSharpReference x:TypeArguments="x:Boolean">IsSuccessful</mca:CSharpReference>
              </OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:Boolean">False</InArgument>
            </Assign.Value>
          </Assign>
          <local:GetTextActivity BookmarkName="getuserpin" Header="Enter Pin" sap2010:WorkflowViewState.IdRef="GetTextActivity_1" Text="Enter 123 to continue, or enter any thing else to see what happens when entering the wrong pin!">
            <local:GetTextActivity.Result>
              <OutArgument x:TypeArguments="s:ScreenOutput">
                <mca:CSharpReference x:TypeArguments="s:ScreenOutput">userPinScreenOutput</mca:CSharpReference>
              </OutArgument>
            </local:GetTextActivity.Result>
          </local:GetTextActivity>
        </Sequence>
      </State.Entry>
      <State.Transitions>
        <Transition DisplayName="T1" sap2010:WorkflowViewState.IdRef="Transition_3">
          <Transition.Condition>
            <mca:CSharpValue x:TypeArguments="x:Boolean">userPinScreenOutput.Text == "123"</mca:CSharpValue>
          </Transition.Condition>
          <Transition.To>
            <State x:Name="__ReferenceID1" DisplayName="Get cash amount" sap2010:WorkflowViewState.IdRef="State_4">
              <State.Entry>
                <local:GetTextActivity BookmarkName="getcashamount" Header="How much?" sap2010:WorkflowViewState.IdRef="GetTextActivity_2" Text="Enter the cash amount">
                  <local:GetTextActivity.Result>
                    <OutArgument x:TypeArguments="s:ScreenOutput">
                      <mca:CSharpReference x:TypeArguments="s:ScreenOutput">cashAmountScreenOutput</mca:CSharpReference>
                    </OutArgument>
                  </local:GetTextActivity.Result>
                </local:GetTextActivity>
              </State.Entry>
              <State.Transitions>
                <Transition DisplayName="T4" sap2010:WorkflowViewState.IdRef="Transition_2">
                  <Transition.To>
                    <State x:Name="__ReferenceID2" DisplayName="dispensing cash" sap2010:WorkflowViewState.IdRef="State_3">
                      <State.Entry>
                        <local:ShowTimedMessageActivity BookmarkName="dispensingCash" Header="Here is your cash" sap2010:WorkflowViewState.IdRef="ShowTimedMessageActivity_2" TimeOut="3500">
                          <local:ShowTimedMessageActivity.Text>
                            <InArgument x:TypeArguments="x:String">
                              <mca:CSharpValue x:TypeArguments="x:String">"Here you go, " + cashAmountScreenOutput.Text + "$"</mca:CSharpValue>
                            </InArgument>
                          </local:ShowTimedMessageActivity.Text>
                        </local:ShowTimedMessageActivity>
                      </State.Entry>
                      <State.Transitions>
                        <Transition DisplayName="T3" sap2010:WorkflowViewState.IdRef="Transition_1">
                          <Transition.To>
                            <State x:Name="__ReferenceID3" DisplayName="FinalState" sap2010:WorkflowViewState.IdRef="State_2" IsFinal="True">
                              <State.Entry>
                                <Assign sap2010:WorkflowViewState.IdRef="Assign_2">
                                  <Assign.To>
                                    <OutArgument x:TypeArguments="x:Boolean">
                                      <mca:CSharpReference x:TypeArguments="x:Boolean">IsSuccessful</mca:CSharpReference>
                                    </OutArgument>
                                  </Assign.To>
                                  <Assign.Value>
                                    <InArgument x:TypeArguments="x:Boolean">True</InArgument>
                                  </Assign.Value>
                                </Assign>
                              </State.Entry>
                            </State>
                          </Transition.To>
                        </Transition>
                      </State.Transitions>
                    </State>
                  </Transition.To>
                </Transition>
              </State.Transitions>
            </State>
          </Transition.To>
        </Transition>
        <Transition DisplayName="T2" sap2010:WorkflowViewState.IdRef="Transition_4" To="{x:Reference __ReferenceID0}">
          <Transition.Action>
            <local:ShowTimedMessageActivity BookmarkName="wrongpin" Header="Wrong Pin!" sap2010:WorkflowViewState.IdRef="ShowTimedMessageActivity_1" Text="No. Please enter 123 as your pin" TimeOut="2000" />
          </Transition.Action>
          <Transition.Condition>
            <mca:CSharpValue x:TypeArguments="x:Boolean">userPinScreenOutput.Text != "123"</mca:CSharpValue>
          </Transition.Condition>
        </Transition>
      </State.Transitions>
    </State>
    <x:Reference>__ReferenceID1</x:Reference>
    <x:Reference>__ReferenceID2</x:Reference>
    <x:Reference>__ReferenceID3</x:Reference>
    <StateMachine.Variables>
      <Variable x:TypeArguments="s:ScreenOutput" Name="userPinScreenOutput" />
      <Variable x:TypeArguments="s:ScreenOutput" Name="cashAmountScreenOutput" />
    </StateMachine.Variables>
    <sads:DebugSymbol.Symbol>d3JDOlxVc2Vyc1xhaG1hZC5rXERvY3VtZW50c1xWaXN1YWwgU3R1ZGlvIDIwMTNcUHJvamVjdHNcQVRNX1dQRl9XRl9URVNUXFNlcnZpY2VzV29ya0Zsb3dzXFdpdGhkcmF3Q2FzaFdvcmtGbG93LnhhbWwiMAORARICAQExBYgBDQIBIE0NfBUCARVaFXgdAgEKZx10JQIBAjMJRRQCATBKDUptAgErhAENhAFtAgEngQENgQHPAQIBIk8RVSkCARhcGWI6AgENaSFyKgIBBDQLPRQCATk+C0QjAgExgQHGAYEBzAECASaBATqBAUQCASWBAUyBAVgCASSBAZsBgQG9AQIBI081T0QCAR9PTE9XAgEeT5EBT6gBAgEdUhdSeQIBGVy3AVy9AQIBFFxGXFYCARNcXlxxAgESXx9fkAECAQ5wTXBRAgEJbCdsegIBBTs3OzwCAT43ETdkAgE6Pi8+OwIBOD5DPk4CATc+iAE+6QECATZBEUFwAgEy</sads:DebugSymbol.Symbol>
  </StateMachine>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="GetTextActivity_1" sap:VirtualizedContainerService.HintSize="242,22" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="264,248">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="GetTextActivity_2" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="ShowTimedMessageActivity_2" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="State_2" sap:VirtualizedContainerService.HintSize="114,61">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">253,529.5</av:Point>
            <av:Size x:Key="ShapeSize">114,61</av:Size>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Transition_1">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:PointCollection x:Key="ConnectorLocation">310,486.5 310,516.5 304.3,516.5 304.3,529.5</av:PointCollection>
            <x:Int32 x:Key="SrcConnectionPointIndex">39</x:Int32>
            <x:Int32 x:Key="DestConnectionPointIndex">34</x:Int32>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="State_3" sap:VirtualizedContainerService.HintSize="326,472">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">239.5,393.5</av:Point>
            <av:Size x:Key="ShapeSize">141,93</av:Size>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
            <x:Double x:Key="StateContainerWidth">127</x:Double>
            <x:Double x:Key="StateContainerHeight">56.831999999999937</x:Double>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Transition_2">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:PointCollection x:Key="ConnectorLocation">320,340.5 320,370.5 317.05,370.5 317.05,393.5</av:PointCollection>
            <x:Int32 x:Key="SrcConnectionPointIndex">39</x:Int32>
            <x:Int32 x:Key="DestConnectionPointIndex">42</x:Int32>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="State_4" sap:VirtualizedContainerService.HintSize="173,101">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">233.5,239.5</av:Point>
            <av:Size x:Key="ShapeSize">173,101</av:Size>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
            <x:Double x:Key="StateContainerWidth">159</x:Double>
            <x:Double x:Key="StateContainerHeight">64.831999999999937</x:Double>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Transition_3" sap:VirtualizedContainerService.HintSize="430,507">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:PointCollection x:Key="ConnectorLocation">312.5,208.5 312.5,238.5 311.35,238.5 311.35,239.5</av:PointCollection>
            <x:Int32 x:Key="SrcConnectionPointIndex">39</x:Int32>
            <x:Int32 x:Key="DestConnectionPointIndex">34</x:Int32>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ShowTimedMessageActivity_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Transition_4" sap:VirtualizedContainerService.HintSize="430,507">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:PointCollection x:Key="ConnectorLocation">382,180.85 412,180.85 412,145.3 382,145.3</av:PointCollection>
            <x:Int32 x:Key="SrcConnectionPointIndex">48</x:Int32>
            <x:Int32 x:Key="DestConnectionPointIndex">12</x:Int32>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="State_1" sap:VirtualizedContainerService.HintSize="139,79">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">243,129.5</av:Point>
            <av:Size x:Key="ShapeSize">139,79</av:Size>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
            <x:Double x:Key="StateContainerWidth">125</x:Double>
            <x:Double x:Key="StateContainerHeight">43.079999999999984</x:Double>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="StateMachine_1" sap:VirtualizedContainerService.HintSize="614,636">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <av:Point x:Key="ShapeLocation">270,2.5</av:Point>
            <x:Double x:Key="StateContainerWidth">600</x:Double>
            <x:Double x:Key="StateContainerHeight">600</x:Double>
            <av:PointCollection x:Key="ConnectorLocation">297,77.5 297,107.5 312,107.5 312,129.5</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="WorkFlows.WithdrawCashWorkFlow_1" sap:VirtualizedContainerService.HintSize="654,716" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>